package com.cos.config.thread.pool;

import java.util.concurrent.*;

/**
 * @author Irving
 * @create 2021/7/16
 * @desc 使用线程池方便管理多线程
 **/
public class COSTaskThreadPool {
    /**
     * 全局线程池,管理COS操作时产生的所有线程
     */
    public static ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(
            10,
            15,
            5,
            TimeUnit.SECONDS,
            new LinkedBlockingQueue<>(20),
            new COSThreadFactory());
}